﻿using System;
using System.Collections.Generic;
using JetBrains.Annotations;

namespace YAFTS.Contracts
{
	public interface ISearchEngine:IDisposable
	{
		void AddObservedDirectory([NotNull] string path, string fileMask = null, bool reqursive = true);
		void AddObservedFile([NotNull] string path);
		void AddIOObserver([NotNull] IIOObserver observer);
		void AddWordsReader([NotNull] IWordsReader reader);
		[NotNull] IEnumerable<string> ExecuteQuery(params string[] words);
		[NotNull] IEnumerable<string> ExecuteQuery(SearchOptions searchOptions, params string[] words);

	 	event EventHandler<ProccessFileExceptionArgs> ProccessError;

		IConfiguration Configuration { get; }
	}
}
